import numpy as np
from model_utils import load_model_and_scaler, predict_next_n_hours

def generate_wind_price_data():
    hours = np.arange(24)
    base = 0.1
    # 风电电价波动较小，带点随机扰动和日周期波动
    noise = np.random.normal(0, 0.01, size=24)
    daily_variation = 0.01 * np.cos((hours - 12) / 24 * 2 * np.pi)
    data = base + daily_variation + noise
    return data.reshape(-1, 1)

if __name__ == "__main__":
    model_path = "saved_models/wind_price_lstm_model.pt"
    scaler_path = "saved_models/wind_price_scaler.pkl"

    model, scaler = load_model_and_scaler(model_path, scaler_path)
    input_data = generate_wind_price_data()

    print("模拟的wind_price 24小时输入数据：")
    print(input_data.flatten())

    preds = predict_next_n_hours(model, scaler, input_data)
    print("未来24小时wind_price预测值：")
    print(preds)
